#include <windows.h>
#include "Lock.h"
Lock::Lock()
	: m_Value(0)
{
}

Lock::~Lock()
{
}

void Lock::AtomicLock()
{
	while (InterlockedExchange(&m_Value, 1) == 1)
		Sleep(0);
}

void Lock::UnatomicLock()
{
	InterlockedExchange(&m_Value, 0);
}